/*
 * @Author: your name
 * @Date: 2019-12-24 10:15:05
 * @LastEditTime: 2019-12-30 10:28:49
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /YiautosAgentApp/src/config/index.js
 */
import { Platform } from 'react-native';
//StatusBar是黑字白底的页面
export const LIGHT_ROUTES = [];
//当前环境: dev/test/prod/pre
const ENV = 'test';
const VERSION_CODE = '2.4.0';
const BUILD_TIME = '2020-01-17 18:00:00';

const CODE_PUSH_KEY_LIST = {
  ios: {
    production: 'tccpokWwRu4qipTxfo3BF7O4tGGH4ksvOXqog',
    staging: 'PtrJdL4xbhkRB8QvI3f7BlJplkcN4ksvOXqog',
  },
  android: {
    production: 'BHF4r5AH4EA8yZ4sdc6kYEiVQO4N4ksvOXqog',
    staging: 'cAS2FtYStIPhQ3WBdxXcUgmOxvpA4ksvOXqog',
  },
};

const AMAP_KEYS = {
  ios: '00ce7aeb71d28a166a2108967da50c3f',
  android: '265fec16bf50cff2d9bdfa8c03577897',
};

function getCodePushKey() {
  return CODE_PUSH_KEY_LIST[Platform.OS][
    ENV === 'prod' ? 'production' : 'staging'
  ];
}

const GlobalConfig = {
  ENV,
  VERSION_CODE,
  CODE_PUSH_KEY: getCodePushKey(),
  WECHAT_APPID: 'wx1234a4c930770955',
  AMAP_KEYS,
  BUILD_TIME,
  registerShare:
    ENV === 'prod'
      ? 'https://activity.yiautos.com/wechat-public/agentregister.html?inviteCode='
      : 'http://event.itsmycar.cn/wechat-public/agentregister.html?inviteCode=',
};

export default GlobalConfig;
